package logic;

import view.*;
import java.util.*;

/**
 * This is the general class for the model.
 * @author Vossen en Konijnen group 2
 *
 */
public abstract class AbstractModel {
	private List<AbstractView> views;
	
	/**
	 * The Constructor for a AbstractModel.
	 */
	public AbstractModel() {
		views=new ArrayList<AbstractView>();
	}
	
	/**
	 * Add's the view to the list of Views.
	 * @param view
	 */
	public void addView(AbstractView view) {
		views.add(view);
	}
	
	/**
	 * Notify's the Views when the model is Changed.
	 */
	public void notifyViews() {
		for(AbstractView v: views) v.updateView();
	}
}